home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------
- SMS-Communication interface (c) Markus Barth 2000
-
-
- ------------------------------------------------------------------*/
- #include <windows.h>
-
- #include "smscom.h"
-
-
- BOOL APIENTRY DllMain (HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
- {
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
-
- return TRUE;
- }
-
- /*-----------------------------------------------------------------------------------
- op_code - nicht benutzt / not used
- src_telnum - Telefonnummer Absender / phone number sender
- dest_telnum - Telefonnumer EmpfΣnger / phone number receiver
- sms_txt - Meldungstext / sms text
- statustext - Infotext
- ------------------------------------------------------------------------------------*/
- SMSCOM_API int smscom (int op_code, char *src_telnum, char *dest_telnum, char *smstxt, char *statustext)
- {
- char textbuf[1024], src_telbuffer[50];
- DWORD Reserved;
-
- memset (textbuf, 0, sizeof (textbuf));
- memset (src_telbuffer, 0, sizeof (src_telbuffer));
-
- if (smstxt && smstxt[0])
- strncpy (textbuf, smstxt, 160);
- else
- return (1); // No command
-
- if (src_telnum)
- strncpy (src_telbuffer, src_telnum, 30);
-
- strupr (textbuf);
-
- MessageBox (NULL, textbuf, "SMSCOM", MB_OK);
-
- /*
- if (strstr (textbuf, "SHUTDOWN"))
- {
- ExitWindowsEx (EWX_SHUTDOWN, Reserved);
- }
-
- if (strstr (textbuf, "SEND STATUS"))
- {
- strcpy (smstxt, "System OK");
-
- if (dest_telnum)
- strcpy (dest_telnum, "+49177"); // fill the destination number and the smstext
- else // to send a reply message
- return 2; // no destination number provided
- }
- */
-
- return (FALSE); // everything OK
- }
-